<template>
  <div class="bt-warning">
    <el-popover placement="top" width="166" v-model="visible" v-if="_SHOWBTN(showBetCode4)">
      <p>确定删除此用户？</p>
      <div style="text-align: right; margin: 0">
        <el-button size="mini" type="text" @click="visible = false">取消</el-button>
        <el-button type="primary" size="mini" @click="clear">确定</el-button>
      </div>
      <el-button slot="reference" type="SingleDeletion" class="delete">删除</el-button>
    </el-popover>
  </div>
</template>
<script>
export default {
  props: ["clearOne", "id","showBetCode4"],
  data() {
    return {
      visible: false,
    };
  },
  methods: {
    clear() {
      this.visible = false;
      this.clearOne(this.id);
    },
  },
};
</script>
<style lang="less" scoped>
/deep/.el-button--SingleDeletion {
  width: 60px;
  height: 28px;
  background: rgba(251, 54, 63, 1);
  border-radius: 4px;
  color: white;
  padding: 0;
}
.delete {
  border: none;
  background: none;
  color: #1677ff;
  font-size: 14px;
  width: 48px;
  height: 14px;
  text-align: center;
  line-height: 14px;
  border-left: 1px solid #dddddd;
}
</style>